import qs, {stringify} from 'qs';
import axios from "axios";

var host = "http://192.168.43.182:8080";

export default {

    login(user, pwd, type) {

        return axios.post(host + "/doLogin",
            {
                username: user,
                password: pwd,
                type: type,
            }).then(response => {
            console.log(response);
        }).catch(err => {
            console.log(err);
        });
    },
    updatePwd(username, password) {
        return axios.post(host + "/user/pwd", {
            username: username,
            password: password,

        }).then(response => {
            return response;
        }).catch(err => {
            console.log(err);
        })
    }
}